Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SECURITY] Disable KSM Metrics related to K8s Secret resources #684

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

gsmith-sas
Copy link
Member

No description provided.

@gsmith-sas gsmith-sas force-pushed the ksm-nosecret-metrics2 branch from 6da44db to c74f918 Compare October 7, 2024 22:43
@gsmith-sas
Copy link
Member Author

The v4m-kube-state-metrics ClusterRole was granted 'list' and 'watch' permission for Kubernetes Secrets resources. Having access to secrets enables an account to potentially escalate privileges. By retrieving a secret, an attacker would be able to access the Kubernetes API Server in the context of that account. We considered whether granting these permissions were strictly necessary and weighed the impact of removing them. The project does not currently make use of the metrics about Kubernetes Secret resources (i.e. kube_secret_info, kube_secret_type, kube_secret_labels and kube_secret_created). Therefore, following the principal of least privilege, we decided that there was no compelling reason to continue to grant these permission.

Users who need/want to re-enable these metrics after considering the security implications can do so by making the changes to the user-values-prom-operator.yaml file in their $USER_DIR/monitoring sub-directory prior to (re)deploying the metric monitoring components.

@gsmith-sas gsmith-sas force-pushed the ksm-nosecret-metrics2 branch from ba71cdb to b9fb641 Compare October 8, 2024 17:32
@gsmith-sas gsmith-sas merged commit 8a4e640 into main Oct 8, 2024
2 checks passed
@gsmith-sas gsmith-sas deleted the ksm-nosecret-metrics2 branch October 8, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant